<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    class ObserveList{
        constructor(){
            this.list=[]
        }
        add(obj){
            this.list.push(obj)
        }
        removeAt(index){
            this.list.splice(index,1)
        }
        count(){
            return this.list.length
        }
        get(index){
            if(index<0||index>this.conut()){
                return
            }
            return this.list[index]
        }
        indexOf(obj){
            return this.list.findIndex(ele=>ele===obj)
        }
    }
</script>
</html>